<include file="Public:header_new"/>
<style type="text/css">
.a-upload {
    padding: 4px 10px;
    height: 30px;
    line-height: 30px;
    position: relative;
    cursor: pointer;
    color: #888;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    display: inline-block;
    *display: inline;
    *zoom: 1
}

.a-upload  input {
    position: absolute;
    font-size: 100px;
    right: 0;
    top: 0;
    opacity: 0;
    filter: alpha(opacity=0);
    cursor: pointer
}

.a-upload:hover {
    color: #444;
    background: #eee;
    border-color: #ccc;
    text-decoration: none
}
.usernewout .usncont .usnc_right h1{line-height: 50px;text-align: center;font-size: 16px;}
.w_new{display: inline-block;width:125px;text-indent: 0;text-align: right;margin-right:10px;}
.iptbox1{width:318px;height: 160px;border:1px solid #5A646F;text-align: center;border-radius: 4px;position: relative;text-indent: 0;}
.iptbox1 img{height:110px;margin-top: 25px;max-width: 280px;}
</style>
<div class="usernewout">
	<div class="usncont">
		<!--左侧菜单-->
		<include file="User:left" />
		<!--左侧菜单-->
		<!--上方导航-->
		<include file="User:nav"/>
		<!--上方导航-->
		<div class="usnc_right">
			<div class="nameauth">
			<h1>{$Think.lang.g_shimingrz}</h1>
			<switch name="shiming" >
				<case value="3">
					<div class="pwtrade">
						<form id="form-nameauth">
							<div class="band_succ">
								<img src="__PUBLIC__/Home/news/images/xz21.png" alt="" style="vertical-align: middle;margin-right: 10px;width:25px;">{$Think.lang.g_has_crosssmrz}
							</div>
							<div class="set_verify">
								<ul style="padding-left: 80px;">
									<!-- <li>{$Think.lang.g_your_sfinfo}</li> -->
									<li><span style="text-align:right;margin-left:0;font-size:14px;color:#7b8a9d;display: inline-block;width:150px;margin-right: 10px;">{$Think.lang.g_name}{$Think.lang.sTrade_index_cnmh}</span>{$user.truename}</li>
									<li><span style="text-align:right;margin-left:0;font-size:14px;color:#7b8a9d;display: inline-block;width:150px;margin-right: 10px;">{$Think.lang.g_zj_type}{$Think.lang.sTrade_index_cnmh}</span>{$user.zhengjian}</li>
									<li><span style="text-align:right;margin-left:0;font-size:14px;color:#7b8a9d;display: inline-block;width:150px;margin-right: 10px;">{$Think.lang.g_zj_no}{$Think.lang.sTrade_index_cnmh}</span>{$user.idcard}</li>
									<li><span style="text-align:right;margin-left:0;font-size:14px;color:#7b8a9d;display: inline-block;width:150px;margin-right: 10px;">{$Think.lang.g_rz_time}{$Think.lang.sTrade_index_cnmh}</span>{$user['addtime']|addtime}</li>
								</ul>
							</div>
							<!--
							<div class="idcard">
								<span>{$Think.lang.g_sf_zheng}{$Think.lang.sTrade_index_cnmh}</span>
								<a href="{$user['idcard_zheng']}" target="_blank">
									<img src="{$user['idcard_zheng']}"/>
								</a>
							</div>
							<div class="idcard" style="margin-top:20px;">
								<span>{$Think.lang.g_sf_fan}{$Think.lang.sTrade_index_cnmh}</span>
								<a href="{$user['idcard_fan']}" target="_blank">
									<img src="{$user['idcard_fan']}"/>
								</a>
							</div>
							<div class="idcard" style="margin-top:20px;">
								<span>{$Think.lang.g_sf_shouchi}{$Think.lang.sTrade_index_cnmh}</span>
								<a href="{$user['idcard_shouchi']}" target="_blank">
									<img src="{$user['idcard_shouchi']}"/>
								</a>
							</div>
							-->
						</form>
					</div>
				</case>
				<case value="2">
					<div class="pwtrade">
						<form id="form-nameauth">
							<div class="band_succ">
								<img src="__PUBLIC__/Home/news/images/xz21.png" alt="" style="vertical-align: middle;margin-right: 10px;width:25px;">{$Think.lang.g_tjinfo_waite}
							</div>
							<div class="set_verify">
								<ul>
									<!-- <li>{$Think.lang.g_your_sfinfo}</li> -->
									<li><span style="text-align:right;margin-left:0;font-size:14px;color:#7b8a9d;display: inline-block;width:150px;margin-right: 10px;">{$Think.lang.g_name}</span>{$user.truename}</li>
									<li><span style="text-align:right;margin-left:0;font-size:14px;color:#7b8a9d;display: inline-block;width:150px;margin-right: 10px;">{$Think.lang.g_zj_type}</span>{$user.zhengjian}</li>
									<li><span style="text-align:right;margin-left:0;font-size:14px;color:#7b8a9d;display: inline-block;width:150px;margin-right: 10px;">{$Think.lang.g_zj_no}</span>{$user.idcard}</li>
									<li><span style="text-align:right;margin-left:0;font-size:14px;color:#7b8a9d;display: inline-block;width:150px;margin-right: 10px;">{$Think.lang.g_rz_time}</span>{$user['addtime']|addtime}</li>
								</ul>
							</div>
							<!-- <div class="idcard" style="margin-left: 50px;">
								<span>{$Think.lang.g_sf_zheng}</span>
								<a href="{$user['idcard_zheng']}" target="_blank">
									<img src="{$user['idcard_zheng']}" style="width:300px;height:180px;"/>
								</a>
							</div>
							<div class="idcard" style="margin-top:20px;margin-left: 50px;">
								<span>{$Think.lang.g_sf_fan}</span>
								<a href="{$user['idcard_fan']}" target="_blank">
									<img src="{$user['idcard_fan']}" style="width:300px;height:180px;"/>
								</a>
							</div>
							<div class="idcard" style="margin-top:20px;margin-left: 50px;">
								<span>{$Think.lang.g_sf_shouchi}</span>
								<a href="{$user['idcard_shouchi']}" target="_blank">
									<img src="{$user['idcard_shouchi']}" style="width:300px;height:180px;"/>
								</a>
							</div> -->
						</form>
					</div>
				</case>
				<case value="0">
				<!-- <h1>请填写实名认证信息</h1> -->
				<div class="rech_top" style="margin-top:10px;width:600px;">
					<div style="color:#059ff5;text-align: center;">{$Think.lang.g_sfinfo_notice}</div>
					<div class="rech_box">
						<div class="rech_bd nmt">
							<ul>
								<li>
									<div class="rechmid" style="width:600px;">
					<form action="{:U('User/upauth')}" name="shiming" method="post">
						<div class="rechipt_box">
							<label style="width:180px;">{$Think.lang.g_real_name}</label>
							<div class="iptbox">
								<input type="text" name="truename" id="truename" class="rechipt"/>
							</div>
						</div>
						<div class="rechipt_box">
							<label style="width:180px;">{$Think.lang.g_zj_type}</label>
							<div class="iptbox">
								<select name="zhengjian" id="zhengjian" class="paysel">
									<volist name="idcardtype" id="vo">
										<option value="{$vo[0]}">{$vo[1]}</option>
									</volist>
								</select>
							</div>
						</div>
						<div class="rechipt_box">
							<label style="width:180px;">{$Think.lang.g_zj_no}</label>
							<div class="iptbox">
								<input type="text" name="idcard" id="idcard" class="rechipt"/>
							</div>
						</div>

						<div class="dv_submit" style="text-align: left;">
							<input type="button" value="{$Think.lang.g_tijao_sm}" onclick="shimingrz();" style="margin-left: 202px;"/>
						</div>
					</form>
									</div>
								</li>
							</ul>
						</div>
					</div>
				</div>
				<script type="text/javascript">
				function shimingrz(){
					var truename = $("#truename").val();
					var zhengjian = $("#zhengjian").val();
					var idcard = $("#idcard").val();
					if(truename == "" || truename == null){
						layer.tips('{$Think.lang.g_inpput_real_name}', '#truename', {
							tips: 3
						});
						return false;
					}
					if(zhengjian == "" || zhengjian == null){
						layer.tips('{$Think.lang.g_inpput_zj_type}', '#zhengjian', {
							tips: 3
						});
						return false;
					}
					if(idcard == "" || idcard == null){
						layer.tips('{$Think.lang.g_inpput_sfno}', '#idcard', {
							tips: 3
						});
						return false;
					}
					layer.load(0, {shade: [0.5,'#8F8F8F']});
					document.shiming.submit();
				}
				</script>
				</case>
				<case value="1">
					<form action="{:U('User/upauth2')}" name="idcard" method="post" enctype="multipart/form-data">
						<if condition="$user.is_agree eq '2'">
							<div class="band_succ">
								<img src="__PUBLIC__/Home/news/images/xx22(1).png" alt="" style="vertical-align: middle;margin-right: 10px;width:25px;">{$Think.lang.g_no_corss_sf}
							</div>
						</if>
						<div class="bohui">
							<!-- <div class="remind">{$Think.lang.g_sf_ts}</div> -->
							<ul>
								<!-- <li>{$Think.lang.User_yourinfo}</li> -->
								<li><span class="w_new">{$Think.lang.g_name}</span>{$user.truename}</li>
								<li><span class="w_new">{$Think.lang.g_zj_type}</span>{$user.zhengjian}</li>
								<li><span class="w_new">{$Think.lang.g_zj_no}</span>{$user.idcard}</li>
								<li  style="height:180px;overflow: hidden;">
									<label>{$Think.lang.g_up_sf_zheng}</label>
									<!-- <div>
										<a href="javascript:;" class="file">
											<input type="file" name="idcard_zheng" id="idcard_zheng"/>
										</a>
									</div> -->
									<div class="iptbox1" style="float:left;">
									<a href="javascript:;">
									<img src="__PUBLIC__/Home/news/images/sf_t1.png" alt="Image preview">
										<input type="file" name="idcard_zheng" id="idcard_zheng" style="width:303px;height: 149px;opacity: 0; filter: alpha(opacity=0);position:absolute;top:5px;left:5px;" />
									</a>
								</div>
								</li>
								<li style="height:180px;overflow: hidden;">
									<label>{$Think.lang.g_up_sf_fan}</label>
									<!-- <div>
										<a href="javascript:;" class="file">
											<input type="file" name="idcard_fan" id="idcard_fan"/>
										</a>
									</div> -->
									<div class="iptbox iptbox1" style="float:left;">
									<a href="javascript:;">
									<img src="__PUBLIC__/Home/news/images/sf_t2.png" alt="Image preview">
										<input type="file" name="idcard_fan" id="idcard_fan"style="width:303x;height: 149px;opacity: 0; filter: alpha(opacity=0);position:absolute;top:5px;left:5px;"/>
									</a>
								</div>
								</li>
								<li style="height:164px;overflow: hidden;">
									<label>{$Think.lang.g_up_sf_hand}</label>
									<!-- <div>
										<a href="javascript:;" class="file">
											<input type="file" name="idcard_shouchi" id="idcard_shouchi"/>
										</a>
									</div> -->
									<div class="iptbox iptbox1" style="float:left;">
									<a href="javascript:;">
									<img src="__PUBLIC__/Home/news/images/sf_t3.png" alt="Image preview">
										<input type="file" name="idcard_shouchi" id="idcard_shouchi" style="width:303px;height: 149px;opacity: 0; filter: alpha(opacity=0);position:absolute;top:5px;left:5px;"/>
									</a>
								</div>
								</li>
							</ul>
							<div class="remind" style="text-align: left;width:300px;margin-left: 197px;">{$Think.lang.g_sf_ts}</div>
						</div>

						<div class="dv_submit" style="text-align: left;text-indent: 62px;">
						<!-- <div class="remind" style="background: #fff">{$Think.lang.g_sf_ts}</div> -->
							<input type="button" value="{$Think.lang.g_tijao_sm}" onclick="idrz();" style="margin-left:133px;width:320px;" />
						</div>
					</form>
					<script type="text/javascript">
					function idrz(){
						var idcard_zheng = $("#idcard_zheng").val();
						var idcard_fan = $("#idcard_fan").val();
						var idcard_shouchi = $("#idcard_shouchi").val();
						if(idcard_zheng == "" || idcard_zheng == null){
							layer.tips('{$Think.lang.g_inpput_sf_zheng}', '#idcard_zheng', {
								tips: 3
							});
							return false;
						}
						if(idcard_fan == "" || idcard_fan == null){
							layer.tips('{$Think.lang.g_inpput_sf_fan}', '#idcard_fan', {
								tips: 3
							});
							return false;
						}
						if(idcard_shouchi == "" || idcard_shouchi == null){
							layer.tips('{$Think.lang.g_inpput_sf_hand}', '#idcard_shouchi', {
								tips: 3
							});
							return false;
						}
						layer.load(0, {shade: [0.5,'#8F8F8F']});
						document.idcard.submit();
					}
					$(".iptbox1").on("change","input[type='file']",function(){
					var filePath=$(this).val();
					var objUrl = getObjectURL(this.files[0]) ;

					// alert(objUrl);
					if(filePath.indexOf("jpg")!=-1 || filePath.indexOf("png")!=-1 || filePath.indexOf("gif")!=-1 || filePath.indexOf("bmp")!=-1){
						$(".fileerrorTip").html("").hide();
						var arr=filePath.split('\\');
						var fileName=arr[arr.length-1];
						// $(".showFileName").html(fileName);
						$(this).parent().find("img").attr("src",objUrl);


					}else{
						$(".showFileName").html("");
						$(".fileerrorTip").html("您未上传文件，或者您上传文件类型有误！").show();
						return false
					}
				});
					$(".a-upload").on("change","input[type='file']",function(){
						var filePath=$(this).val();
						if(filePath.indexOf("jpg")!=-1 || filePath.indexOf("png")!=-1 || filePath.indexOf("gif")!=-1 || filePath.indexOf("bmp")!=-1){
							$(".fileerrorTip").html("").hide();
							var arr=filePath.split('\\');
							var fileName=arr[arr.length-1];
							$(".showFileName").html(fileName);
						}else{
							$(".showFileName").html("");
							$(".fileerrorTip").html("{$Think.lang.g_up_error}").show();
							return false
						}
					});
					function getObjectURL(file) {
    					var url = null;
    					if (window.createObjectURL != undefined) { // basic
        					url = window.createObjectURL(file);
    					} else if (window.URL != undefined) { // mozilla(firefox)
        					url = window.URL.createObjectURL(file);
    					} else if (window.webkitURL != undefined) { // webkit or chrome
        					url = window.webkitURL.createObjectURL(file);
    					}
    					return url;
				}
					</script>
				</case>
				<default />
			</switch>
			</div>
		</div>
	</div>
</div>
<script>
//菜单高亮
$('#user_index').addClass('on');
</script>
<include file="Public:footer_new"/>